<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of persistenciaUsuario
 *
 * @author Agustin
 */
class ControladoraCochera {

    private static $instance = false;

    public static function getInstance() {
        if (!self::$instance instanceof self) {
            self::$instance = new self;
        }
        return self::$instance;
    }

    private function __construct() {
        
    }

    public function traerCocheras($dato) {
        require_once '../Modelo/persistenciaCochera.php';
        try {
            $pC = persistenciaCochera:: getInstance();
            return $pC->traerCochera($dato);
        } catch (Exception $exc) {
            echo $exc->getTraceAsString();
        }
    }

    public function agregarCocheras($dato) {
        require_once 'Modelo/persistenciaCochera.php';
        try {
            $pC = persistenciaCochera:: getInstance();
            return $pC->crearCochera($dato);
        } catch (Exception $exc) {
            echo $exc->getTraceAsString();
        }
    }

    public function actualizarCocheras($dato) {
        require_once 'Modelo/persistenciaCochera.php';
        try {
            $pC = persistenciaCochera:: getInstance();
            return $pC->actualizarCochera($dato);
        } catch (Exception $exc) {
            echo $exc->getTraceAsString();
        }
    }

}

?>
